package com.bwie.auth.feign;

import com.bwie.common.domain.Admin;
import com.bwie.common.result.Result;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @Author：作者姓名
 * @Package：com.bwie.auth.feign
 * @Project：_yk
 * @name：Factory
 * @Date：2024/6/17 9:27
 */
@Component
public class Factory implements FallbackFactory<AdminFeign> {
    @Override
    public AdminFeign create(Throwable cause) {
        return new AdminFeign() {
            @Override
            public Result<Admin> FindAll(String userName) {
                throw new RuntimeException("服务器异常请重试……");
            }
        };
    }
}
